/**
 * Created by Administrator on 2015/10/25.
 */
var welcomeC = angular.module('welcome.controller',['ionic','app.factory']);

welcomeC.controller('welcomeCtrl',['$scope','$timeout','$state','DB',function($scope,$timeout,$state,DB){
  $timeout(function(){
    DB.isFistLogin(callback);
  },3000);

  var callback = function(booleanValue){
    if(booleanValue){
      //是第一次登陆
      $state.go('leader');
    }else{
      //不是第一次登陆
      $state.go('login');
    }
  }
}]);


